names = [""] * 45
values = [[] for i in range(45)]
for i in range(45):
    names[i] = raw_input()
    for j in range(200):
        values[i].append(raw_input())
    raw_input()

print ",".join(names)
for i in range(200):
    print ",".join([values[j][i] for j in range(45)])

